package com.zxt.dental_sys.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName doctor_info
 */
@TableName(value ="doctor_info")
@Data
public class DoctorInfo implements Serializable {
    /**
     * 医生id
     */
    @TableId
    private String doctorId;

    /**
     * 资格证明
     */
    private String qualificationCertificate;

    /**
     * 科室
     */
    private String departments;

    /**
     * 擅长领域
     */
    private String fields;

    /**
     * 职称
     */
    private String jobTitle;

    /**
     * 关联用户id
     */
    private String userId;

    /**
     * 是否审核通过
0未审核
-1未通过审核
1审核中
2审核通过
     */
    private Integer status;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DoctorInfo other = (DoctorInfo) that;
        return (this.getDoctorId() == null ? other.getDoctorId() == null : this.getDoctorId().equals(other.getDoctorId()))
            && (this.getQualificationCertificate() == null ? other.getQualificationCertificate() == null : this.getQualificationCertificate().equals(other.getQualificationCertificate()))
            && (this.getDepartments() == null ? other.getDepartments() == null : this.getDepartments().equals(other.getDepartments()))
            && (this.getFields() == null ? other.getFields() == null : this.getFields().equals(other.getFields()))
            && (this.getJobTitle() == null ? other.getJobTitle() == null : this.getJobTitle().equals(other.getJobTitle()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDoctorId() == null) ? 0 : getDoctorId().hashCode());
        result = prime * result + ((getQualificationCertificate() == null) ? 0 : getQualificationCertificate().hashCode());
        result = prime * result + ((getDepartments() == null) ? 0 : getDepartments().hashCode());
        result = prime * result + ((getFields() == null) ? 0 : getFields().hashCode());
        result = prime * result + ((getJobTitle() == null) ? 0 : getJobTitle().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", doctorId=").append(doctorId);
        sb.append(", qualificationCertificate=").append(qualificationCertificate);
        sb.append(", departments=").append(departments);
        sb.append(", fields=").append(fields);
        sb.append(", jobTitle=").append(jobTitle);
        sb.append(", userId=").append(userId);
        sb.append(", status=").append(status);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}